Skip to content

feat: add owner authorization guard, aggregate stats across all relays, and support icon updates - #2

Merged
deymosh merged 1 commit into
stagingfrom
feature/management-api
Jul 26, 2026
Merged

feat: add owner authorization guard, aggregate stats across all relays, and support icon updates#2
deymosh merged 1 commit into
stagingfrom
feature/management-api

Conversation

@deymosh

@deymosh deymosh commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Pull Request: Management API Enhancements and Security

Description

This PR improves the NIP-86 management API by adding strict owner authentication, aggregating metrics across all relays, and handling icon updates globally.

Changes

  • Authorization: Added RejectAPICall to restrict management actions solely to the relay owner (config.OwnerPubKey).
  • Aggregated Stats: Updated Stats to collect metrics and event counts for all relays (private, chat, inbox, outbox) with differentiated keys.
  • Global Icon Updates: Modified ChangeRelayIcon to update icons across all relays and persist them in the .env file.
  • Error Handling: Replaced string errors with errors.New to comply with Go's error interface.

@deymosh
deymosh merged commit 39f48d1 into staging Jul 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant